<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../css/mui.css">
		<style>
			body{
				background: #F8F8F8;
			}
			.mui-bar{
				background:linear-gradient(180deg,rgba(252,126,119,1) 0%,rgba(254,96,93,1) 100%);
			}
			a,.mui-title{
				color:rgba(255,255,255,1);
			}
			.container_apply{
				width: 100%;
				height: 163px;
				position: relative;
				float: left;
				background:rgba(255,255,255,1);
				margin-top: 44px;
				box-sizing: border-box;
			}
			.apply_in{
				width: calc(96% - 15px);
				height: 54px;
				position: relative;
				float: left;
				margin-left: 15px;
				border-bottom: 1px solid #ECECEC;
				line-height: 54px;
			}
			.apply_in:last-child{
				border-bottom: none;
			}
			.apply_in>span{
				font-size:15px;
				font-family:PingFang-SC-Medium;
				font-weight:500;
				color:rgba(51,51,51,1);
			}
			.apply_in>input{
				width: 80%;
				font-size:15px;
				font-family:PingFang-SC-Medium;
				font-weight:500;
				color:rgba(51,51,51,1);
				line-height:45px;
				border: none;
			}
			.apply_btn{
				width: calc(96% - 15px);
				height: 43px;
				background:linear-gradient(180deg,rgba(252,126,119,1) 0%,rgba(254,96,93,1) 100%);
				box-shadow:0px 5px 8px 0px rgba(254, 95, 99, 0.35);
				border-radius:43px;
				position: relative;
				float: left;
				text-align: center;
				line-height: 43px;
				margin-top: 50px;
				margin-left: 15px;
			}
			.apply_btn>span{
				font-size:16px;
				font-family:PingFang-SC-Bold;
				font-weight:bold;
				color:rgba(255,255,255,1);
			}
		</style>
	</head>

	<body contextmenu="return false;">
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">商家入驻申请</h1>
		</header>	
		<div class="mui-content">
			<div class="container_apply">
				<div class="apply_in">
					<span>商家姓名</span>
					<input type="text" name="name" id="name" value="" />
				</div>
				<div class="apply_in">
					<span>商家电话</span>
					<input type="number" name="phone" id="phone" value="" />
				</div>
				<div class="apply_in">
					<span>退货地址</span>
					<input type="text" name="address" id="address" value="" />
				</div>
			</div>
			<div class="apply_btn">
				<span>提交申请</span>
			</div>
		</div>
		<script src="../js/mui.js"></script>
		<script src="../js/jquery-3.1.1.min.js"></script>
		<script type="text/javascript">
			mui.plusReady(function(){
				var url = plus.storage.getItem('url');
				var user = plus.storage.getItem('user');
				user = JSON.parse(user);
				mui.init();
					// url:"partner.html",
					// id:"partner.html",
					
				//点击立即申请
				mui(".mui-content").on("tap",".apply_btn",function(){
					var name = $("#name").val();
					if(!name){
						mui.toast('请填写商家姓名!');
						return;
					}
					var phone = $("#phone").val();
					if(!phone){
						mui.toast('请填写商家手机!');
						return;
					}
					var address = $("#address").val();
					if(!address){
						mui.toast('请填写退货地址!');
						return;
					}
					// plus.nativeUI.showWaiting();
					mui.post(url+'/juyou/hehuo/applyhehuo',{token:user.token,name:name,phone:phone,address:address},function(res){
						// plus.nativeUI.closeWaiting();
						mui.toast(res.msg);
						if(res.code==200){
								setTimeout(function(){
									mui.back();
								},1500)
						}
					})
				})
			})
		
		</script>
	</body>

</html>
